home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Online / MiamiSDK / netinclude / libraries / usergroup.h < prev   
Encoding:
C/C++ Source or Header  |  1997-12-04  |  1.0 KB  |  43 lines

  1. #ifndef LIBRARIES_USERGROUP_H
  2. #define LIBRARIES_USERGROUP_H
  3.  
  4. #define _PASSWORD_EFMT1 '_' /* extended encryption format */
  5.  
  6. #define _PASSWORD_LEN   128 /* max length, not counting NULL */
  7.  
  8. #define NGROUPS 32
  9.  
  10. #define MAXLOGNAME      32
  11.  
  12. struct UserGroupCredentials {
  13.   long    cr_ruid;
  14.   long    cr_rgid;
  15.   unsigned short cr_umask;
  16.   long    cr_euid;
  17.   short   cr_ngroups;
  18.   long    cr_groups[NGROUPS];
  19.   struct Task *cr_session;
  20.   char    cr_login[MAXLOGNAME];
  21. };
  22.  
  23. /*
  24.  * ID conversion macros between usergroup.library and MultiUser
  25.  */
  26. #define UG2MU(id) ((id) == 0 ? 65535 : (id) == -2 ? 0 : (id))
  27. #define MU2UG(id) ((id) == 65535 ? 0L : (id) == 0L ? -2L : (id))
  28.  
  29. /*
  30.  * Tags for ug_SetupContextTags()
  31.  */
  32. #define UGT_ERRNOBPTR 0x80000001
  33. #define UGT_ERRNOWPTR 0x80000002
  34. #define UGT_ERRNOLPTR 0x80000004
  35. #define UGT_ERRNOPTR(size)\
  36.   ((size == 4) ? UGT_ERRNOLPTR :\
  37.    (size == 2) ? UGT_ERRNOWPTR :\
  38.    (size == 1) ? UGT_ERRNOBPTR : 1L)
  39. #define UGT_OWNER     0x80000011
  40. #define UGT_INTRMASK  0x80000010
  41.  
  42. #endif /* LIBRARIES_USERGROUP_H */
  43.